import request from "../utils/request";

//条件分页查询
export const queryItemAll = (page,pageSize,code,title,category) => {return request.get(`/item?page=${page}&pageSize=${pageSize}&code=${code}&title=${title}&category=${category}`)};

//添加
export const addItemDate = (data) => {return request.post(`/item`,data)};

//回显数据
export const queryItemById = (id) => {return request.get(`/item/${id}`)};

//修改
export const updateItemDate = (data) => {return request.put(`/item`,data)};

//查询所有数据
export const queryItemList = (pageSelect,pageSizeSelect,skuName,spuCode) => {return request.get(`/item/all?pageSelect=${pageSelect}&pageSizeSelect=${pageSizeSelect}&skuName=${skuName}&spuCode=${spuCode}`)};

//分页查询sku
export const querySkuPageApi=(title,code,pageNum,pageSize)=>request.get(`/item/sku/page?title=${title}&code=${code}&pageNum=${pageNum}&pageSize=${pageSize}`)